from django.contrib import admin
from django import forms
from .models import Device

class DeviceAdminForm(forms.ModelForm):

    class Meta:
        model = Device
        fields = '__all__'


class DeviceAdmin(admin.ModelAdmin):
    form = DeviceAdminForm
    list_display = ['camera_id', 'created_time', 'last_modified', 'comera_name', 'status']
    readonly_fields = ['camera_id', 'created_time', 'last_modified', 'comera_name', 'status']

admin.site.register(Device, DeviceAdmin)


